/*
 * @Author: yushuang
 * @Date: 2024-12-19 11:25:38
 * @LastEditors: yushuang
 * @LastEditTime: 2024-12-19 11:26:38
 * @Description:
 */
import { inject, provide } from 'vue';
import type { useAppStore } from '@/stores/app.ts';
import { useLayoutMenu } from '@/stores/layout-menu';

export const LayoutMenuKey = Symbol('LayoutMenu');
export function useLayoutMenuProvide(layoutMenu: ReturnType<typeof useLayoutMenu>, appStore: ReturnType<typeof useAppStore>) {
  provide(LayoutMenuKey, { layoutMenu, appStore });
}

export function useLayoutMenuInject() {
  return inject(LayoutMenuKey, {} as any);
}
